package com.wxzz.elearing.course.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wxzz.elearning.common.bean.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class TrainSurvey extends BaseEntity {

    @ApiModelProperty(value = "企业id")
    private Long enterpriseId;

    @NotNull(message = "请传入调查标题")
    @ApiModelProperty(value = "调查标题")
    private String surveyTitle;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "发布日期")
    private LocalDateTime startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "请传入截止日期")
    @ApiModelProperty(value = "截止日期")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "状态 0-调查中 1-已结束")
    private Integer status;

    @TableField(exist = false)
    @ApiModelProperty(value = "是否完成 0-未完成 1-已完成")
    private Integer isPass;

    @TableField(exist = false)
    @ApiModelProperty(value = "参与人数")
    private Integer surveyNum = 0;

    @TableField(exist = false)
    @ApiModelProperty(value = "题目数量")
    private Integer topicsNum = 0;

    @TableField(exist = false)
    @ApiModelProperty(value = "考试测评试题")
    private List<CurriculumSectionTopic> curriculumSectionTopics;

}
